package com.forbiddendesert.actions;
import com.forbiddendesert.characters.Character;

import com.forbiddendesert.logic.Gear;


public class TradeGear extends Action
{
	Character mRecipient;
	Character mDonor;
	Gear mGear;
	
	public TradeGear(Character recipient, Character donor, Gear gear)
	{
		mRecipient = recipient;
		mDonor = donor;
		mGear = gear;
	}

	@Override
	public int updateAction() 
	{
		if(mDonor.hasGear(mGear))
		{
			mRecipient.addGear(mGear);
			mDonor.removeGear(mGear);
		}

		return Action.COMPLETE;
	}

}
